package com.kaifamiao.month03.day0317;

public class Stack {


    char[] strs = new char[10];
    int count;

    public char pop(){
        char str = strs[count - 1];
        System.arraycopy(strs,count,strs,count - 1,strs.length - count);
        count --;
        return str;
    }

    public char push(char str){
        strs[count ++] = str;
        return str;
    }

    public boolean isEmpty(){
        return count == 0;
    }

}
